package com.atguigu.test2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;

/**
 * @author 路飞
 * @date 2024/3/28 11:00
 * @description 16、请编写代码读取一个项目根目录下info.properties文件
 */
public class Exer16 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("info.properties");
        Properties properties = new Properties();
        properties.load(fis);
        for (Map.Entry entry : properties.entrySet()) {
            System.out.println(entry.getKey() + " = " + entry.getValue());
        }
    }
}
